import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import articles from '../components/Views/Articles.vue'




const routes = [
  {
    path: '/',
    redirect: "/home"
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView,
    redirect: "/home/articles",
    children: [
      { path: "articles", name: "articles", component: articles },
      {
        path: "projects", name: "projects", component:
          () => import(/*webpackChunkName:"projects" */ '../components/Views/Projects.vue')
      },
      {
        path: "aboutblok", name: "aboutblok", component:
          () => import(/*webpackChunkName:"aboutblok" */ '../components/AboutBlok/AboutBlok.vue')
      },
    ]
  },
  {
    path: '/management',
    name: "management",

    component: () => import(/*webpackChunkName:"management" */ '../components/user_info/Management.vue'),

  },
  {
    path: '/showartcle',
    name: "showartcle",

    component: () => import(/*webpackChunkName:"management" */ '../components/ShowArts/ShowArtcles_Main.vue'),

  },
  


]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
